<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <!-- 样式 -->
  <style>
    button {
      background-color: #f0f0f0;
      font: 24px;
    }
    #box1 {
      width: 200px;
      height: 200px;
      background-color:aquamarine;
    }
  </style>
</head>

<body>
  <!-- 结构 -->
   <div id="box1">
     <button>许个愿吧</button>
   </div>

  <!-- 行为 -->
  <script>
    document.querySelector('button').onclick = () => {
      alert('有钱有闲')
    }
  </script>
</body>

</html>